<template>
  <div v-show="status == 0">
    <el-button size="small" @click="handlepass(props.a)">通过</el-button>
    <el-button size="small" type="danger" @click="handleclick(props.a)"
      >忽略</el-button
    >
  </div>
  <div v-show="status == 2">已忽略</div>
  <div v-show="status == 1">已通过</div>
</template>

<script setup>
import { handleevent } from './hooks/handleevent'
import { getOneEventhttp } from '../../../request/eventHttp.js'
import { onMounted } from 'vue'
const props = defineProps({
  a: {
    type: Number,
    required: true,
  },
})

const status = ref()
onMounted(async () => {
  const res = await getOneEventhttp(props.a)
  status.value = res.data.result.event_status
})
onUpdated(async () => {
  const res = await getOneEventhttp(props.a)
  status.value = res.data.result.event_status
})
const { handleclick, handlepass } = handleevent(status)
</script>

<style scoped></style>
